1. Field of the Invention
The present invention relates to a transaction processing system and method that provide the capability to use one two-phase commit engine over multiple protocols and products, while being able to vary the log presumptions according to the requirements of each protocol and product.
2. Description of the Related Art
Many commercial transaction-processing systems rely on the two-phase commit protocol to preserve ACID properties in a unit of work that spans multiple resource managers. The two-phase commit protocol requires a series of messages to be exchanged between a transaction manager or coordinator and the resource managers that are defined by a voting process. This voting process is performed in two phases: in the first phase, resource managers are asked to checkpoint their view of the work scoped by the transaction and indicate if they were successful. In the second phase, the coordinator communicates whether or not the resource managers should make permanent and visible the changes that were check-pointed.
For this process to provide ACID guarantees in the face of a failure, the coordinator must log information to a non-volatile store (typically disk) that can be used to recover a coordinator failure. This adds further overhead to the process. In order to provide enhanced performance, presumptions may be made about the protocol to minimize the number of log writes that must be made. These are well-understood optimizations and include “presumed abort” and “presumed commit” assumptions—the absence of certain log messages indicates that the resource manager may presume that the transaction was either aborted or committed. The full protocol without presumptions is sometimes said to “presume nothing”.
Different transaction models that include reifications of the protocol require, for interoperability, that the coordinator maintain fixed recovery semantics. The conventional solution is for a coordinator to include presumptions explicitly in the two-phase commit algorithm. This is inflexible especially considering the increasing requirements for interoperability in various software architectures the most directly relevant being transaction processing protocols. It is desirable to be able to use the same two phase commit coordinator in transaction managers that support different variations (based on presumptions) of the atomic transaction model. A need arises for a technique by which the log presumptions may be varied.